//
//  EnjoyLunboSelectViewController.m
//  TasteEnjoy
//
//  Created by XuRui on 16/5/3.
//  Copyright © 2016年 XuRui. All rights reserved.
//

#import "EnjoyLunboSelectViewController.h"

@interface EnjoyLunboSelectViewController ()<UIWebViewDelegate>

@end

@implementation EnjoyLunboSelectViewController

- (void)dealloc
{
    [_url release];
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    [self createSubView];
}


#pragma mark - ------------ 创建web子视图 ---------------
- (void)createSubView
{
    //UIWebView 加载网页数据 直接适配屏幕
    
    
    UIWebView *wv = [[UIWebView alloc]initWithFrame:CGRectMake(0, -50,self.view.frame.size.width, self.view.frame.size.height + 50)];
    [self.view addSubview:wv];
    wv.delegate = self;
    //加载网址
    [wv loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:_url]]];
    
    wv.scalesPageToFit = YES;
    
    [wv release];
    
}

#pragma mark - ------------ tab隐藏 ---------------
- (void)webViewDidStartLoad:(UIWebView *)webView
{
    self.tabBarController.tabBar.hidden = YES;


}
- (void)viewWillDisappear:(BOOL)animated
{

    self.tabBarController.tabBar.hidden = NO;

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
